<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Incremental Project Builders</title>
<style type="text/css">@import url("file:/home/moovida/rcpdevelopment/eclipse/configuration/org.eclipse.osgi/bundles/488/1/.cp/book.css");</style>
<style type="text/css">@import url("file:/home/moovida/rcpdevelopment/eclipse/configuration/org.eclipse.osgi/bundles/505/1/.cp/schema.css");</style>
</HEAD>
<BODY>
<H1 style="text-align:center">Incremental Project Builders</H1>
<p></p>
<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.core.resources.builders<p></p>
<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>The workspace supports the notion of an incremental 
project builder (or "builder" for short").  The job 
of a builder is to process a set of resource changes 
(supplied as a resource delta).  For example, a Java 
builder would recompile changed Java files and produce 
new class files. 
<p>
Builders are configured on a per-project basis and run 
automatically when resources within their project are 
changed.  As such, builders should be fast and scale 
with respect to the amount of change rather than the 
number of resources in the project.  This typically 
implies that builders are able to incrementally update 
their "built state". 
<p>
The builders extension-point allows builder writers 
to register their builder implementation under a 
symbolic name that is then used from within the 
workspace to find and run builders. The symbolic 
name is the id of the builder extension. When defining a builder extension, users are encouraged to include a human-readable value for the "name" attribute which identifies their builder and potentially may be presented to users.<p></p>
<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
<p></p>
<p class="code SchemaDtd">&lt;!ELEMENT <a name="e.extension">extension</a> (<a href="#e.builder">builder</a>)&gt;</p>
<p class="code SchemaDtd">&lt;!ATTLIST extension</p>
<p class="code SchemaDtdAttlist">point&nbsp;CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">name&nbsp;&nbsp;CDATA #IMPLIED</p>&gt;</p>
<p></p>
<ul class="ConfigMarkupAttlistDesc">
<li><b>point</b> - a fully qualified identifier of the target extension point</li>
<li><b>id</b> - an optional identifier of the extension instance</li>
<li><b>name</b> - an optional name of the extension instance</li>
</ul>
<br><p class="code SchemaDtd">&lt;!ELEMENT <a name="e.builder">builder</a> (<a href="#e.run">run</a>?)&gt;</p>
<p class="code SchemaDtd">&lt;!ATTLIST builder</p>
<p class="code SchemaDtdAttlist">hasNature&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(true | false) </p><p class="code SchemaDtdAttlist">isConfigurable&nbsp;&nbsp;&nbsp;(true | false) </p><p class="code SchemaDtdAttlist">callOnEmptyDelta&nbsp;(true | false) </p>&gt;</p>
<p></p>
<ul class="ConfigMarkupAttlistDesc">
<li><b>hasNature</b> - "<tt>true</tt>" or "<tt>false</tt>" indicating whether the builder is owned by
a project nature.  If "<tt>true</tt>" and no corresponding nature is
found, this builder will not run but will remain in the project's
build spec.  If the attribute is not specified, it is assumed to be "<tt>false</tt>".</li>
<li><b>isConfigurable</b> - "<tt>true</tt>" or "<tt>false</tt>" indicating whether the builder allows customization of what build triggers it will respond to.  If "<tt>true</tt>", clients will be able to use the API <tt>ICommand.setBuilding</tt> to specify if this builder should be run for a particular build trigger. If the attribute is not specified, it is assumed to be "<tt>false</tt>".</li>
<li><b>callOnEmptyDelta</b> - "<tt>true</tt>" or "<tt>false</tt>" indicating whether the builder should be called on <tt>INCREMENTAL_BUILD</tt> when the resource deltas for its affected projects are empty.  If "<tt>true</tt>", the builder will always be called on builds of type <tt>INCREMENTAL_BUILD</tt>, regardless of whether any resources in the affected projects have changed.  If "<tt>false</tt>" or unspecified, the builder will only be called when affected projects have changed.  The value of this attribute does not affect the behaviour of builders for other build triggers, such as <tt>AUTO_BUILD</tt> or <tt>FULL_BUILD</tt>This attribute is intended to be used by builders that incrementally react to changing circumstances outside of the workspace, such as external libraries.</li>
</ul>
<br><p class="code SchemaDtd">&lt;!ELEMENT <a name="e.run">run</a> (<a href="#e.parameter">parameter</a>*)&gt;</p>
<p class="code SchemaDtd">&lt;!ATTLIST run</p>
<p class="code SchemaDtdAttlist">class&nbsp;CDATA #REQUIRED</p>&gt;</p>
<p></p>
<ul class="ConfigMarkupAttlistDesc">
<li><b>class</b> - the fully-qualified name of a subclass of 
<samp>org.eclipse.core.resources.IncrementalProjectBuilder</samp>.</li>
</ul>
<br><p class="code SchemaDtd">&lt;!ELEMENT <a name="e.parameter">parameter</a> EMPTY&gt;</p>
<p class="code SchemaDtd">&lt;!ATTLIST parameter</p>
<p class="code SchemaDtdAttlist">name&nbsp;&nbsp;CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">value&nbsp;CDATA #REQUIRED</p>&gt;</p>
<p></p>
<ul class="ConfigMarkupAttlistDesc">
<li><b>name</b> - the name of this parameter made available to 
instances of the specified builder class</li>
<li><b>value</b> - an arbitrary value associated with the given 
name and made available to instances of the 
specified builder class</li>
</ul>
<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>Following is an example of a builder configuration: 

<p>
<pre class="Example"><span class="code SchemaTag">
   &lt;extension id=</span><span class="code SchemaCstring">&quot;coolbuilder&quot;</span><span class="code SchemaTag"> name=</span><span class="code SchemaCstring">&quot;Cool Builder&quot;</span><span class="code SchemaTag"> point=</span><span class="code SchemaCstring">&quot;org.eclipse.core.resources.builders&quot;</span><span class="code SchemaTag">&gt; 
      &lt;builder hasNature=</span><span class="code SchemaCstring">&quot;false&quot;</span><span class="code SchemaTag">&gt; 
         &lt;run class=</span><span class="code SchemaCstring">&quot;com.xyz.builders.Cool&quot;</span><span class="code SchemaTag">&gt; 
            &lt;parameter name=</span><span class="code SchemaCstring">&quot;optimize&quot;</span><span class="code SchemaTag"> value=</span><span class="code SchemaCstring">&quot;true&quot;</span><span class="code SchemaTag">/&gt; 
            &lt;parameter name=</span><span class="code SchemaCstring">&quot;comment&quot;</span><span class="code SchemaTag"> value=</span><span class="code SchemaCstring">&quot;Produced by the Cool Builder&quot;</span><span class="code SchemaTag">/&gt; 
         &lt;/run&gt; 
      &lt;/builder&gt; 
   &lt;/extension&gt; 
</span></pre>
</p>

If this extension was defined in a plug-in with id "com.xyz.coolplugin", the fully qualified name of this builder would be "com.xyz.coolplugin.coolbuilder".
<p></p>

<h6 class="CaptionFigColumn SchemaHeader">API Information: </h6>The value of the class attribute must represent a 
subclass of <samp>org.eclipse.core.resources.IncrementalProjectBuilder</samp>.
<p></p>

<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>The platform itself does not have any predefined 
builders. Particular product installs may include 
builders as required.
<p></p>

<br>
<p class="note SchemaCopyright">
Copyright (c) 2002, 2006 IBM Corporation and others.<br>
All rights reserved. This program and the accompanying materials are made 
available under the terms of the Eclipse Public License v1.0 which 
accompanies this distribution, and is available at 
<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>

</p>
</BODY>
</HTML>
